﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 库存明细基础输入参数
/// </summary>
public class inventorydetailsBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 物料编号
    /// </summary>
    public virtual long? materialCode { get; set; }
    
    /// <summary>
    /// 物料名称
    /// </summary>
    public virtual string? materialName { get; set; }
    
    /// <summary>
    /// 物料类型
    /// </summary>
    public virtual string? materialType { get; set; }
    
    /// <summary>
    /// 当前库存量
    /// </summary>
    public virtual int? currentStock { get; set; }
    
    /// <summary>
    /// 存放位置
    /// </summary>
    public virtual string? location { get; set; }
    
    /// <summary>
    /// 最后入库日期
    /// </summary>
    public virtual DateTime? lastInboundDate { get; set; }
    
    /// <summary>
    /// 最后出库日期
    /// </summary>
    public virtual DateTime? lastOutboundDate { get; set; }
    
    /// <summary>
    /// 库存状态
    /// </summary>
    public virtual bool? stockStatus { get; set; }
    
}

/// <summary>
/// 库存明细分页查询输入参数
/// </summary>
public class PageinventorydetailsInput : BasePageInput
{
    /// <summary>
    /// 物料编号
    /// </summary>
    public long? materialCode { get; set; }
    
    /// <summary>
    /// 物料名称
    /// </summary>
    public string? materialName { get; set; }
    
    /// <summary>
    /// 物料类型
    /// </summary>
    public string? materialType { get; set; }
    
    /// <summary>
    /// 当前库存量
    /// </summary>
    public int? currentStock { get; set; }
    
    /// <summary>
    /// 存放位置
    /// </summary>
    public string? location { get; set; }
    
    /// <summary>
    /// 最后入库日期范围
    /// </summary>
     public DateTime?[] lastInboundDateRange { get; set; }
    
    /// <summary>
    /// 最后出库日期范围
    /// </summary>
     public DateTime?[] lastOutboundDateRange { get; set; }
    
    /// <summary>
    /// 库存状态
    /// </summary>
    public bool? stockStatus { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 库存明细增加输入参数
/// </summary>
public class AddinventorydetailsInput
{
    /// <summary>
    /// 物料编号
    /// </summary>
    public long? materialCode { get; set; }
    
    /// <summary>
    /// 物料名称
    /// </summary>
    [MaxLength(32, ErrorMessage = "物料名称字符长度不能超过32")]
    public string? materialName { get; set; }
    
    /// <summary>
    /// 物料类型
    /// </summary>
    [MaxLength(32, ErrorMessage = "物料类型字符长度不能超过32")]
    public string? materialType { get; set; }
    
    /// <summary>
    /// 当前库存量
    /// </summary>
    public int? currentStock { get; set; }
    
    /// <summary>
    /// 存放位置
    /// </summary>
    [MaxLength(32, ErrorMessage = "存放位置字符长度不能超过32")]
    public string? location { get; set; }
    
    /// <summary>
    /// 最后入库日期
    /// </summary>
    public DateTime? lastInboundDate { get; set; }
    
    /// <summary>
    /// 最后出库日期
    /// </summary>
    public DateTime? lastOutboundDate { get; set; }
    
    /// <summary>
    /// 库存状态
    /// </summary>
    public bool? stockStatus { get; set; }
    
}

/// <summary>
/// 库存明细删除输入参数
/// </summary>
public class DeleteinventorydetailsInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 库存明细更新输入参数
/// </summary>
public class UpdateinventorydetailsInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 物料编号
    /// </summary>    
    public long? materialCode { get; set; }
    
    /// <summary>
    /// 物料名称
    /// </summary>    
    [MaxLength(32, ErrorMessage = "物料名称字符长度不能超过32")]
    public string? materialName { get; set; }
    
    /// <summary>
    /// 物料类型
    /// </summary>    
    [MaxLength(32, ErrorMessage = "物料类型字符长度不能超过32")]
    public string? materialType { get; set; }
    
    /// <summary>
    /// 当前库存量
    /// </summary>    
    public int? currentStock { get; set; }
    
    /// <summary>
    /// 存放位置
    /// </summary>    
    [MaxLength(32, ErrorMessage = "存放位置字符长度不能超过32")]
    public string? location { get; set; }
    
    /// <summary>
    /// 最后入库日期
    /// </summary>    
    public DateTime? lastInboundDate { get; set; }
    
    /// <summary>
    /// 最后出库日期
    /// </summary>    
    public DateTime? lastOutboundDate { get; set; }
    
    /// <summary>
    /// 库存状态
    /// </summary>    
    public bool? stockStatus { get; set; }
    
}

/// <summary>
/// 库存明细主键查询输入参数
/// </summary>
public class QueryByIdinventorydetailsInput : DeleteinventorydetailsInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDatainventorydetailsInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 库存明细数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportinventorydetailsInput : BaseImportInput
{
    /// <summary>
    /// 物料编号 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? materialCode { get; set; }
    
    /// <summary>
    /// 物料编号 文本
    /// </summary>
    [ImporterHeader(Name = "物料编号")]
    [ExporterHeader("物料编号", Format = "", Width = 25, IsBold = true)]
    public string materialCodeFkDisplayName { get; set; }
    
    /// <summary>
    /// 物料名称
    /// </summary>
    [ImporterHeader(Name = "物料名称")]
    [ExporterHeader("物料名称", Format = "", Width = 25, IsBold = true)]
    public string? materialName { get; set; }
    
    /// <summary>
    /// 物料类型
    /// </summary>
    [ImporterHeader(Name = "物料类型")]
    [ExporterHeader("物料类型", Format = "", Width = 25, IsBold = true)]
    public string? materialType { get; set; }
    
    /// <summary>
    /// 当前库存量
    /// </summary>
    [ImporterHeader(Name = "当前库存量")]
    [ExporterHeader("当前库存量", Format = "", Width = 25, IsBold = true)]
    public int? currentStock { get; set; }
    
    /// <summary>
    /// 存放位置
    /// </summary>
    [ImporterHeader(Name = "存放位置")]
    [ExporterHeader("存放位置", Format = "", Width = 25, IsBold = true)]
    public string? location { get; set; }
    
    /// <summary>
    /// 最后入库日期
    /// </summary>
    [ImporterHeader(Name = "最后入库日期")]
    [ExporterHeader("最后入库日期", Format = "", Width = 25, IsBold = true)]
    public DateTime? lastInboundDate { get; set; }
    
    /// <summary>
    /// 最后出库日期
    /// </summary>
    [ImporterHeader(Name = "最后出库日期")]
    [ExporterHeader("最后出库日期", Format = "", Width = 25, IsBold = true)]
    public DateTime? lastOutboundDate { get; set; }
    
    /// <summary>
    /// 库存状态
    /// </summary>
    [ImporterHeader(Name = "库存状态")]
    [ExporterHeader("库存状态", Format = "", Width = 25, IsBold = true)]
    public bool? stockStatus { get; set; }
    
}
